
include $(ACM_ROOT)/src/common_lib_macro.mk

LOCAL_CPPFLAGS = \
  $(COMMON_LIB_CPPFLAGS) \
  -I $(ACM_ROOT)/src/include \
  -I $(ACM_ROOT)/src/kernel/include \
  -I $(ACM_ROOT)/src/queue/include \
  -I $(ACM_ROOT)/src/utils/include \
  -I $(ACM_ROOT)/src/common/include  

LINK_FLAGS = -L$(LIBDIR) -lcl_common_cpp -lpthread 

vpath %.h ../include

BINS = test_unique_ptr test_lambdas test_copy_elide_nvo
all: $(BINS) 
.PHONY: all

CPP_SRC = \
  test_unique_ptr.cpp \
  test_lambdas.cpp \
	test_copy_elide_nvo.cpp  

CPP_OBJS = $(CPP_SRC:.cpp=.o)

#$(BINS):
#	for bin in $(BINS); do \
#		$(CCC) -o $$bin 
#

test_unique_ptr : test_unique_ptr.o 
	$(CCC) -o $@ $^ $(LINK_FLAGS) 

test_lambdas : test_lambdas.o 
	$(CCC) -o $@ $^ $(LINK_FLAGS) 

test_copy_elide_nvo : test_copy_elide_nvo.o 
	$(CCC) -o $@ $^ $(LINK_FLAGS) 



.PHONY: clean
clean:
	$(RM) $(CPP_OBJS) $(BINS)

ifneq ($(MAKECMDGOALS),clean)
-include $(CPP_SRC:.cpp=.d)
endif
